package com.woniuxy01;

/**
 * @author 作者
 * @create 2025-07-22 14:10
 */
public class Book {
    String name;
    String isbn;
    String author;
    String publisher;
    double price;

    //无参构造
    public Book(){
    }
    //全参构造
    public Book(String name, String isbn, String author, String publisher, double price){
        this.name = name;
        this.isbn = isbn;
        this.author = author;
        this.publisher = publisher;
        this.price = price;
    }


    public Book(String name, String isbn, String author){
        this(name, isbn, author, "", 0.0);
    }

    public String showInfo(){
        return "name:"+name+",isbn"+isbn+",author"+author+",publisher"+publisher+",price"+price;
    }
}
